package Ventana;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JProgressBar;

/**
 * Ventana que se encarga de poner un panel mientras que se descargan los libros
 */
public class VentanaCarga{

	public static JFrame jF;
	private JPanel contentPane;



	/**
	 * Create the frame.
	 */
	public VentanaCarga() {
		jF = new JFrame();
		jF.setResizable(false);
		jF.setUndecorated(true);
		jF.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jF.setBounds(100, 100, 316, 133);
		jF.setLocationRelativeTo(null);
		jF.setOpacity(0.90f);
		contentPane = new JPanel();
		contentPane.setBackground(new Color(0, 102, 255));
		contentPane.setForeground(Color.BLUE);
		contentPane.setBorder(null);
		jF.setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblLibreria = new JLabel("LIBRERIA");
		lblLibreria.setFont(new Font("Viner Hand ITC", Font.BOLD, 37));
		lblLibreria.setBounds(10, 11, 256, 68);
		contentPane.add(lblLibreria);
		
		JLabel lblOnline = new JLabel("ONLINE");
		lblOnline.setFont(new Font("Viner Hand ITC", Font.BOLD, 37));
		lblOnline.setBounds(10, 39, 243, 96);
		contentPane.add(lblOnline);
		
		JLabel lblCargando = new JLabel("CARGANDO...");
		lblCargando.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblCargando.setBounds(198, 108, 108, 14);
		contentPane.add(lblCargando);
	}
	/**Cierra la ventana
	 */
	public static void cerrar(){
		jF.dispose();
	}
	/**Cambia la visibilidad de la ventana
	 * @param v Visible o no
	 */
	public static void setVisible1(boolean v){
		jF.setVisible(v);
	}
}
